package top.haijunit.work.core.auth;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

/**
 * 【说明类功能】
 *
 * @author zhanghaijun
 * @since 2024-09-19
 */
@Data
@Schema(description = "登录用户")
public class LoginUser {

    /**
     * 用户名
     */
    @Schema(description = "用户名")
    @NotBlank(message = "用户名不能为空")
    @Length(min = 6, max = 16, message = "用户名长度必须在6-16之间")
    private String username;

    /**
     * 密码
     */
    @Schema(description = "密码")
    @NotBlank(message = "密码不能为空")
    private String password;

    /**
     * 记住我
     */
    @Schema(description = "记住我")
    @NotNull(message = "记住我不能为空")
    private Boolean rememberMe;
}
